/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package eu.himeros.spellchecker;

import eu.himeros.alignment.StringAligner;
import eu.himeros.alignment.UpperCaseSimEvaluator;
import org.apache.lucene.search.spell.StringDistance;

/**
 *
 * @author federico
 */
public class AncientGreekDistance implements StringDistance {
    StringAligner sa=new StringAligner(new UpperCaseSimEvaluator());

    public AncientGreekDistance(){
        super();
    }

    public float getDistance(String s1, String s2) {
        sa.align(s1, s2);
        float res=1;
        res=1/(float)sa.getEditDistance();
        return res;
    }

}
